package string;

/**
 * 截取字符串，含头不含尾
 */
public class SubStringDemo {
    public static void main(String[] args) {
        String s="www.tetu.ccc";
        //int start=s.indexOf("t");
        //int end=s.lastIndexOf(".");
        int start=s.indexOf(".")+1;
        int end=s.indexOf(".",start);
        String name=s.substring(start,end);
        System.out.println(name);
    }
}
